<%@ page contentType="text/html; charset=UTF-8"%>
<%@include file="/common/common_taglib.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
	<%@include file="/common/common_meta.jsp" %>
	<link href="css/grid.css" rel="stylesheet" type="text/css" />
	<link href="css/icon.css" rel="stylesheet" type="text/css" />
	<link href="css/normalize.css" rel="stylesheet" type="text/css" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />
	<link href="css/dialog.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<%@include file="../include/header.jsp" %>
	<section>
		<div class="main">
			<div class="body container">
				<div class="colgroup">
			    	<div class="typecho-page-title col-mb-12">
				        <table width="100%">
		                    <colgroup>
		                        <col width="15%">
		                        <col width="50%">
		                        <col width="20%">
		                        <col width="15%">
		                    </colgroup>
		                    <thead>
		                        <tr>
		                            <th>用户</th>
		                            <th>内容</th>
		                            <th>日期</th>
		                            <th>操作</th>
		                        </tr>
		                    </thead>
		                    <tbody>
		                    <c:forEach items="${page.list}" var="msgs">
		                    	<tr>
		                        	<td><a style="cursor: pointer;" id="msgs_user" name="${msgs.name}" pic="${msgs.avatar}" web="${msgs.website}" email="${msgs.email}" userip="${msgs.userip}">${msgs.name}</a></td>
		                        	<td align="center">${msgs.content}</td>
		                        	<td align="center"><fmt:formatDate value="${msgs.createtime}" pattern="yyyy/MM/dd HH:mm" /></td>
		                        	<td align="center"><a msgid="${msgs.id}" id="msgs_delete" style="cursor: pointer;">删除</a></td>
		                        </tr>
		                    </c:forEach>
		                    <c:if test="${empty page.list}">
		                    	<tr>
		                        	<td colspan="6"><h4 align="center">没有用户留言信息</h4></td>
		                        </tr>
							</c:if>
							<c:if test="${!empty page.list}">
								<tr align="right">
									<td colspan="6">
										<c:if test="${page.num!=1}">
											<a href="admin/msgList/1.html">首页</a>
											<a href="admin/msgList/${page.num-1}.html">上一页</a>
										</c:if>
										<c:forEach var="i" begin="${page.begin}" end="${page.end}">
											<a <c:if test="${page.num==i}">style="font-size: 18px;"</c:if> href="admin/msgList/${i}.html">${i}</a>
										</c:forEach>
										<c:if test="${page.navCount!=0&&page.num!=page.last}">
											<a href="admin/msgList/${page.num+1}.html">下一页</a>
											<a href="admin/msgList/${page.navCount}.html">尾页</a>
										</c:if>
									</td>
								</tr>
							</c:if>
		                    </tbody>
		                </table>
			    	</div>
				</div>
		   	</div>
		</div>
		<div style="display: none;" id="msgs_dialog">
			<div>
				<span>&nbsp;&nbsp;&nbsp;用户名：</span>
				<span id="msg_username"></span>
			</div>
			<div>
				<span>用户网址：</span>
				<span><a id="msg_website" target="_blank"></a></span>
			</div>
			<div>
				<span>&nbsp;&nbsp;注册 IP ：</span>
				<span id="msg_userip"></span>
			</div>
			<div>
				<span>邮箱地址：</span>
				<span id="msg_email"></span>
			</div>
			<div>
				<span>用户头像：</span>
				<span><img alt="暂无图片" src="" id="msg_pic"/></span>
			</div>
		</div>
	</section>
	<script src="js/require.js" defer async="true" data-main="js/admin_message"></script>
</body>
</html>